package com.sa.module.uif.pojo;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

/**
 * 活动类型，即每个活动的标签。存在继承的父子关系，标签以标签树的形式存在
 * @author huangxin
 *
 */
@MappedSuperclass
public class AbstractAKind {

	private int id;
	private String description;	//活动类型的描述
	private int aKId;	//父标签的Id,父标签的该值为0
	
	public AbstractAKind(int id, String describe, int aKId) {
		super();
		this.id = id;
		this.description = describe;
		this.aKId = aKId;
	}
	
	public AbstractAKind() {
		super();
		// TODO Auto-generated constructor stub
	}
	@Id 
	@GeneratedValue(strategy=IDENTITY)	    
	@Column(name="ID", unique=true, nullable=false)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	
	@Column(name="DESCRIPTION", nullable=true, length=10)
	public String getDescription() {
		return description;
	}

	public void setDescription(String describe) {
		this.description = describe;
	}

	@Column(name="AKID", nullable=true)
	public int getaKId() {
		return aKId;
	}

	public void setaKId(int aKId) {
		this.aKId = aKId;
	}

	@Override
	public String toString() {
		return "AbstractAKind [id=" + id + ", describe=" + description + ", aKId="
				+ aKId + "]";
	}
	
	
}
